<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
/*设置背景图片*/
body{background-image:url(img/Glogo.png); background-attachment:fixed; background-repeat:repeat-x;}
.box1 {
	width:1000px;
	height:300px;
	background-color:red;
	background-image:url(img/cat.gif);
	background-repeat:no-repeat;
	/*背景是否重复no-repeat不重复*/
}
.box2 {
	width:1000px;
	height:300px;
	background-color:blue;
	background-image:url(img/logo_s1.jpg);
	background-repeat:repeat-y;
	/*repeat-y 在y轴重复*/
}
.box3 {
	width:100px;
	height:100px;
	background-image:url(img/colorsolid.jpg);
	background-repeat:repeat-x;
	/*repeat-x 在x轴重复*/
	background-position:0px -100px;
}
.box3:hover{
	background-position:-100px -100px;}
</style>
</head>

<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</body>
</html>
